package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.entity.DishFlavor;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author kai
 * @version 1.0
 * @date 2024/3/24
 * @Description
 */
@Mapper
public interface DishFlavorMapper {

    /**
     * 批量插入口味数据
     * @param flavors
     */

    void insertBatch(List<DishFlavor> flavors);

    @Delete("delete from dish_flavor where dish_id = #{dishId}")
    void deletedishbyId(Long dishId);


    /**
     * 批量删除
     * @param dishIds
     */
    void deletedishbyIds(List<Long> dishIds);


    @Select("select * from dish_flavor where  dish_id = #{dishId}")
    List<DishFlavor> getByDishId(Long dishId);
}
